import {lazy,Suspense} from "react" // lazy 是路由懒加载，Suspense路由加载前没成功之前得loding
let routerList = [
    {
        path:"/all",
        component:lazy(()=>import("../views/all.jsx")),
        children:[
            {
                path:"/all/movie",
                component:lazy(()=>import("../views/movie.jsx")),
            },
            {
                path:"/all/video",
                component:lazy(()=>import("../views/video.jsx")),
            },
            {
                path:"/all/shortvideo",
                component:lazy(()=>import("../views/shortVido.jsx")),
            },
            {
                from:"/all",
                to:"/all/movie"
            }
        ]
    },
    {
        path:"/my",
        component:lazy(()=>import("../views/my.jsx"))
    },
    {
        path:"/detail/:id",
        component:lazy(()=>import("../views/detail"))
    },
    {
        path:"/login",
        component:lazy(()=>import("../views/login.jsx"))
    },
    {
        from:"/",
        to:"/all"
    }
]
export default routerList